//
//  QLBaseViewController.m
//  QLTabBarTransition
//
//  Created by Shrek on 16/3/24.
//  Copyright © 2016年 Shreker. All rights reserved.
//

#import "QLBaseViewController.h"

@interface QLBaseViewController ()

@end

@implementation QLBaseViewController

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    CATransition *transition = [CATransition animation];
    [transition setDuration:0.25];
    //[transition setType:kCATransitionPush];
    [transition setType:@"oglFlip"];
    [transition setSubtype:kCATransitionFromTop];
    [transition setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
    [self.tabBarController.view.layer addAnimation:transition forKey:nil];
}


//@property(copy) NSString *type;
///* The name of the transition. Current legal transition types include
// * `fade', `moveIn', `push' and `reveal'. Defaults to `fade'. */
//1.#define定义的常量
//kCATransitionFade   交叉淡化过渡
//kCATransitionMoveIn 新视图移到旧视图上面
//kCATransitionPush   新视图把旧视图推出去
//kCATransitionReveal 将旧视图移开,显示下面的新视图
//
//2.用字符串表示
//pageCurl            向上翻一页
//pageUnCurl          向下翻一页
//rippleEffect        滴水效果
//suckEffect          收缩效果，如一块布被抽走
//cube                立方体效果
//oglFlip             上下翻转效果

//@property(nullable, copy) NSString *subtype;
///* An optional subtype for the transition. E.g. used to specify the
// * transition direction for motion-based transitions, in which case
// * the legal values are `fromLeft', `fromRight', `fromTop' and
// * `fromBottom'. */

@end
